<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <ul id="list">
        <li id="li1">li1</li>
        <li id="li2">li2</li>
        <li id="li3">li3</li>
    </ul>

    <script>
        const list = document.getElementById('list');

        const lis = new DocumentFragment();//节点容器<></>
        for (let i = 0; i <= 10; i++) {
            const newli = document.createElement('li');
            newli.innerHTML = i;
            // lis.push(newli);
            lis.append(newli); // 性能 重新渲染
        }
        list.append(lis);
    </script>

</body>

</html>